﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:local="using:Sparrow.Chart"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <local:BooleanToVisibilityConverter x:Key="booleanToVisibility"/>

    <Style TargetType="Line" x:Key="axisLineStyle">
        <Setter Property="Stroke" Value="White"/>
        <Setter Property="StrokeThickness" Value="2"/>
    </Style>
    <Style TargetType="Line" x:Key="majorLineStyle">
        <Setter Property="Stroke" Value="#FFD4D4D4"/>
        <Setter Property="StrokeThickness" Value="1"/>
    </Style>
    <Style TargetType="Line" x:Key="minorLineStyle">
        <Setter Property="Stroke" Value="#FFB0B0B0"/>
        <Setter Property="StrokeThickness" Value="0.5"/>
    </Style>
    <Style TargetType="Line" x:Key="crossLineStyle">
        <Setter Property="Stroke" Value="#FFD4D4D4"/>
        <Setter Property="StrokeThickness" Value="1"/>
    </Style>
    <Style TargetType="Line" x:Key="minorCrossLineStyle">
        <Setter Property="Stroke" Value="#FFB0B0B0"/>
        <Setter Property="StrokeThickness" Value="0.5"/>
    </Style>
    <Style TargetType="Border" x:Key="containerBorderStyle">
        <Setter Property="BorderBrush" Value="#FFD4D4D4"/>
        <Setter Property="BorderThickness" Value="1"/>
    </Style>
    <DataTemplate x:Key="yAxisHeaderTemplate">
        <TextBlock Text="{Binding}" FontSize="12" FontWeight="Bold" TextWrapping="Wrap">
            <TextBlock.RenderTransform>
                <RotateTransform Angle="270"/>
            </TextBlock.RenderTransform>
        </TextBlock>
    </DataTemplate>
    <DataTemplate x:Key="xAxisHeaderTemplate">
        <TextBlock Text="{Binding}" FontSize="12" FontWeight="Bold" TextWrapping="Wrap">
        </TextBlock>
    </DataTemplate>

    <DataTemplate x:Key="axisLabelTemplate">
        <TextBlock Text="{Binding}" FontSize="12" FontWeight="Light" TextWrapping="Wrap">
        </TextBlock>
    </DataTemplate>
    
    <DataTemplate x:Key="legendTitleTemplate">
        <TextBlock Text="{Binding}" FontSize="12" FontWeight="Bold" TextAlignment="Center" TextWrapping="Wrap">
        </TextBlock>
    </DataTemplate>

    <DataTemplate x:Key="defaultItemTemplate">
        <StackPanel Orientation="Horizontal" >
            <Grid>
                <Rectangle Width="10" Height="10" Fill="{Binding IconColor}" Visibility="{Binding ShowIcon,Converter={StaticResource booleanToVisibility}}"/>
            </Grid>
            <TextBlock Text="{Binding Label}"
                     Margin="2"
                     VerticalAlignment="Center"/>
        </StackPanel>
    </DataTemplate>
</ResourceDictionary>